package hxy.bytecode.proxy;

import hxy.bytecode.proxy.service.TagService;
import hxy.bytecode.proxy.service.impl.TagServiceImpl;

import java.lang.reflect.Proxy;

/**
 * @author iris
 * @link https://blog.csdn.net/zxysshgood/article/details/78684229
 * https://blog.csdn.net/zxysshgood/article/details/78684229
 */
public class ProxyStart {

    public static void main(String[] args) {

        JdkInvocation invocation = new JdkInvocation();

        invocation.setTagServiceObject(new TagServiceImpl());

        TagService service = (TagService) Proxy.newProxyInstance(ProxyStart.class.getClassLoader(), new Class[]{TagService.class}, invocation);

        service.printSomeThing();

    }
}